﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Calculator
    {
        
        float n1;
        float n2;
        public void NhapDuLieu()
        {
            
            Console.Write("nhap so thu 1: ");
            n1 = Convert.ToSingle(Console.ReadLine());
            Console.Write("nhap so thu 2: ");
            n2 = Convert.ToSingle(Console.ReadLine());
        }
        public float Nhap1
        {
            get { return n1; }
            set { n1 = value; }
        }
       

        public float Nhap2
        {
            get { return n2; }
            set { n2 = value; }
        }
        public Calculator()
        {
            
            n1 = 1;
            n2 = 2;
        }
        public Calculator(float A, float B)
        {
            A = n1;
            B = n2;
            
        }
        public float CongHaiSo()
        {
            
            float KQ;
            KQ = n1 + n2;
            return KQ;
        }
        public float TruHaiSo()
        {
            
            float KQ;
            KQ= n1- n2;
            return KQ;
        }
         
        public float NhanHaiSo()
        {
            
            float KQ;
            KQ= n1*n2;
            return KQ;
        }
        public float ChiaHaiSo()
        {
            
            float KQ;
            KQ = n1 / n2;
            return KQ;
        }
    }
}
